package com.yya.ratelimiter.controller;

import com.yya.ratelimiter.annotation.RateLimit;
import com.yya.ratelimiter.enums.LimitationAlgorithmType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Autor: yuanyongan
 * @Description:
 * @Date 2023/1/10 15:48
 */

@RestController
public class HelloController {

    @GetMapping("/hello")
    @RateLimit(time = 10, count = 3, algorithm = LimitationAlgorithmType.SlidingWindowAlg)
    public String hello(){
        return "hello";
    }
}
